﻿@model DoAnWebsite.Models.Video
@using Ext.Net
@using Ext.Net.MVC
@{
    ViewBag.Title = "Create Video";
    Layout = "~/Views/Shared/_Layout_Admin.cshtml";
}

@section Header
{

}
@section ToolbarSection{
    @Html.X().Button().Text("Save").ID("btnSave").Disabled(true).Icon(Icon.Disk).DirectEvents(de =>
            {
                de.Click.Url = Url.Action("CreateVideo");
                de.Click.EventMask.ShowMask = true;
                de.Click.FormID = "FormPanelCreateVideo";
            })
           @* *@
    
    @Html.X().Button().Text("Back").Icon(Icon.ArrowLeft).Margins("0 0 0 10").Listeners(ls => ls.Click.Handler = "window.parent.location.reload();parentAutoLoadControl.close();")
}

@Html.X().FormPanel().ID("FormPanelCreateVideo").Title("Create Video").StyleSpec("position: static; z-index: 10;width: 100%;").Layout(LayoutType.Form).AutoScroll(true).Anchor("100% 100%").Listeners(
ls => ls.ValidityChange.Handler = "App.btnSave.setDisabled(!valid)").Items(
        Html.X().ComboBoxFor(m => m.GroupVideoID).FieldLabel("GroupVideo").LabelWidth(130).Items(ViewBag.GVideoId).Width(800).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextFieldFor(m => m.Name).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().FileUploadField().FieldLabel("Image").ID("UpImage").Icon(Icon.ImageAdd).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextFieldFor(m=>m.File).FieldLabel("File").Icon(Icon.FolderFilm).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px"),
        Html.X().HyperLink().Text("Upload Video").ID("linkUpVideo").NavigateUrl("http://www.youtube.com/").Target("_blank").Width(100).StyleSpec("Float: right; Margin: 0px 150px 0px 0px"),
        Html.X().TextAreaFor(m=>m.Content).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().HtmlEditorFor(m=>m.Detail).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().DateFieldFor(m=>m.Date).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextFieldFor(m => m.Title).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextAreaFor(m => m.Description).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1),
        Html.X().TextFieldFor(m => m.Keyword).Width(800).LabelWidth(130).StyleSpec("Margin: 15px 0px 0px 100px").Flex(1)
        )